#!/bin/bash

numProcesses=`ps -A | wc -l`
numNetworkConnections=`lsof -i | wc -l`

if [ $numProcesses -gt 30 ]
then
  echo There are more than 30 processes running
fi

if [ $numNetworkConnections -gt 5 ]
then
  echo There are more than 5 network connections open
fi
